package home.projects.aop.components;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public class SDFAspect {

   @Before("pointCutter()")
   public void formatInvoker(JoinPoint jp) {
      Object[] args = jp.getArgs();
      System.out.println("The argument passed was: "
            + (args.length == 0 ? "NULL" : args[0]));
   }

   @Pointcut("execution(public * *.*(..))")
   public void pointCutter() {}
}
